package com.dems.core.util;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class BeanContextUtil {
    @Autowired
    private ApplicationContext context;

    public Object getBeanByName(String beanName) {
        return context.getBean(beanName);
    }
}
